# Contributor: Yura Kushnir <kushnir.yura@gmail.com>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py3-urllib3
_pkgname=urllib3
pkgver=1.26.10
pkgrel=0
pkgdesc="HTTP library with thread-safe connection pooling, file post, and more"
url="https://github.com/urllib3/urllib3"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-setuptools"
source="$pkgname-$pkgver.tar.gz::https://github.com/urllib3/urllib3/archive/$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
options="!check" # needs py3-tornado from community

replaces="py-urllib3" # Backwards compatibility
provides="py-urllib3=$pkgver-r$pkgrel" # Backwards compatibility

# secfixes:
#   1.25.9-r0:
#     - CVE-2020-26137
#   1.26.4-r0:
#     - CVE-2021-28363

build() {
	python3 setup.py build
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
27b5bba51ccceefe2228de054c588a3e554dd2c0a0285e4c1bded41b30a870507a57a4cb4a0e21b11409bb74e7f31499478a87cc91cec8cc252390aafb15d586  py3-urllib3-1.26.10.tar.gz
"
